<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>ifrema</title>
    <link rel="stylesheet" href="./index.css">
    <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.css" rel="stylesheet">
    <link href="http://cdn.staticfile.org/foundation/6.0.1/css/foundation.css" rel="stylesheet">
    <script src="http://lib.sinaapp.com/js/angular.js/angular-1.2.19/angular.js"></script>
    <script src="http://libs.baidu.com/backbone/0.9.2/backbone.js"></script>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.js"></script>
</head>
<body>
    <script>
        let ifr = document.createElement('iframe');
        ifr.style.display = 'none';
        ifr.src = "http://localhost:8081/data.html#data";
        document.body.appendChild(ifr);
        
        function checkHash() {
            try {
                let data = location.hash ? location.hash.substring(1) : '';
                console.log('获得到的数据是：', data);
            }catch(e) {

            }
        }
        window.addEventListener('hashchange', function(e) {
            console.log('获得的数据是：', location.hash.substring(1));
        });
    </script>
</body>
</html>
